#ifndef __SIMPLESTACK_HPP__
#define __SIMPLESTACK_HPP__

#include <cstdint>

#define STACK_SIZE 100

// 用于存放音乐播放历史记录
class SimpleStack
{
private:
    uint16_t stack[STACK_SIZE];
    uint16_t top = 0;
    SimpleStack();
public:
    static SimpleStack *getInst() { static SimpleStack instance; return &instance; }
    void push(uint16_t value);
    uint16_t pop();
    bool checkNumIn(uint16_t index, uint16_t num);  // 查看最近 num 个记录中是否包含 index
};

#endif // __SIMPLESTACK_HPP__